package com.nitobi.coop.model
{
	import com.nitobi.coop.vo.GroupVO;
	
	import mx.collections.ArrayCollection;
	
	public class CoopModel
	{
		private static var instance:CoopModel;
		
		private var _groupListAC:ArrayCollection = new ArrayCollection();
		private var _groupDailyEntriesAC:ArrayCollection = new ArrayCollection();
		private var _todaysHours:Number = new Number();
		private var _groupId:Number = new Number();

		[Bindable]
		public function set groupId(value:Number):void
		{
			_groupId = value;
		}
		
		public function get groupId():Number
		{
			return _groupId;
		}
		
		[Bindable]
		public function set todaysHours(value:Number):void
		{
			_todaysHours = value;
		}
		
		public function get todaysHours():Number
		{
			return _todaysHours;
		}
		
		[Bindable]
		public function set groupListAC(value:ArrayCollection):void
		{
			_groupListAC = value;
		}
		
		public function get groupListAC():ArrayCollection
		{
			return _groupListAC;
		}

		[Bindable]
		public function set groupDailyEntriesAC(value:ArrayCollection):void
		{
			_groupDailyEntriesAC = value;
		}
		
		public function get groupDailyEntriesAC():ArrayCollection
		{
			return _groupDailyEntriesAC;
		}
				
		public function CoopModel()
		{
			if( CoopModel.instance != null ) 
			{
				throw new Error( "CoopModel is a singleton." );
			}			
		}
		
		public static function getInstance():CoopModel
		{
			if( CoopModel.instance == null ) 
			{
				CoopModel.instance = new CoopModel();
			}
			return CoopModel.instance;
		}

	}
}